import request from '@/utils/http'
export const admerLoginAPI = (account, password) => {
    return request({
        url: '/admerLogin',
        method: 'post',
        data: {
            aid: account,
            password
        }
    })
}
export const admerRegisterAPI = (aid, password) => {
    return request({
        url: '/admerRegister',
        method: 'post',
        data: {
            aid,
            password
        }
    })
}
export const getAdmerInfoAPI = (account, password) => {
    return request({
        url: '/admerLogin',
        method: 'POST',
        data: {
            account,
            password
        }
    })
}
export const queryOrderAPI = (state, oid) => {
    return request({
        url: '/queryOrder',
        method: 'post',
        data: {
            state,
            oid
        }
    })
}
export const getRefundMsgAPI = (oid) => {
    return request({
        url: 'getRefundMsg',
        method: 'post',
        data: {
            oid
        }
    })
}
export const refutRefundAPI = (oid) => {
    return request({
        url: 'refutRefund',
        method: 'post',
        data: {
            oid
        }
    })
}
export const agreeRefundAPI = (oid) => {
    return request({
        url: 'agreeRefund',
        method: 'post',
        data: {
            oid
        }
    })
}
export const queryRefundListAPI = (oid, state) => {
    return request({
        url: 'queryRefundList',
        method: 'post',
        data: {
            oid,
            state
        }
    })
}
export const deliverGoodAPI = (oid) => {
    return request({
        url: 'deliverGood',
        method: 'post',
        data: {
            oid
        }
    })
}
export const queryGoodListAPI = (gid, state, cid) => {
    return request({
        url: 'queryGoodList',
        method: 'post',
        data: {
            gid,
            state,
            cid
        }
    })
}
export const getCategoriesAPI = () => {
    return request({
        url: '/getCategories',
        method: 'get'
    })
}
export const updataGoodInfoAPI = (goodInfo) => {
    return request({
        url: '/updataGoodInfo',
        method: 'post',
        data: {
            goodInfo
        }
    })
}

export const addGoodAPI = (goodInfo) => {
    return request({
        url: '/addGood',
        method: 'post',
        data: {
            goodInfo
        }
    })
}